package net.mingsoft.document.dao;

import net.mingsoft.document.action.r.FileEntityResponse;
import net.mingsoft.document.entity.FileGrantEntity;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author gengfa
 * @date 22/01/27
 */
public interface FileGrantDao {

    int insertOne(FileGrantEntity entity);

    @MapKey(value = "fileId")
    Map<String, FileGrantEntity> selectMapByFileIds(@Param("list") List<FileEntityResponse> list,
                                                    @Param("id") long id);
    FileGrantEntity selectByFileId(String fileId);
}
